<?php

  /* config error and log */
  error_reporting ( E_ALL | ~ E_STRICT );
  ini_set ( 'display_errors', 1 );
  ini_set ( 'error_log', 'logs/error.log' ); 

  /* config timezone for missing php timezone */
  date_default_timezone_set ( 'Asia/Saigon' );

  /* set the cache expire to 5 minutes */
  session_cache_expire(5);        
  /* get cookie params and overwrite it */      
  $ccp = session_get_cookie_params();
  $rootDomain = '.dsproject.com';        
  session_set_cookie_params( $ccp["lifetime"], $ccp["path"], $rootDomain, $ccp["secure"], $ccp["httponly"] );

  /* set session memcached */
  $session_save_path = "tcp://127.0.0.1:11211?persistent=1&weight=1&timeout=1&retry_interval=15, tcp://127.0.0.1:11211";
  ini_set ( 'session.save_handler', 'memcache' );
  ini_set ( 'session.save_path', $session_save_path );

  /* start write session */
  session_start ();  

  // facebook config
  define('FACEBOOK_APP_ID', '254872827911422');
  define('FACEBOOK_SECRET', '3ba4442033a4e931a0cc624440b17388');

  // client config
  define('PARTNER_ID', '1');
  define('PARTNER_PASSWORD', 'thuands');

  // set browser header unicode
  header ( 'Content-Type: text/html; charset=utf-8' );
                                       
?>